package cn.tedu.shoot;

import java.awt.image.BufferedImage;

//子弹
public class Bullet extends FlyingObject {

	private int speed;

	public Bullet(int x, int y) {// 子弹有很多个，每个子弹的初始位置是不一定的
		super(30, 94, x, y);
		speed = 3;
	}

	public void step() {
		y-=speed;//y-（向上）
	}

	public BufferedImage getImage() {
		if(isLive()) {
			return Images.bullet;
		}else if(isDead()) {
			state=REMOVE;
		}
		return null;
	}
	public boolean isOutOfBounds() {
		return y<=-height;
	}

}
